package com.bawei.yangzongcai___day2.MaiDongFangHong.day8;

import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.bawei.mmvvpp.pp.KotlinPretenter;
import com.bawei.mmvvpp.vv.KotlinAcyivity;
import com.bawei.mmvvpp.vv.KotlinBaseAcyivity;
import com.bawei.yangzongcai___day2.R;
import com.blankj.utilcode.util.ToastUtils;

import java.util.List;

@Route(path = "/tiao8/dongfanghong8")
public class MainDongFangHong8 extends KotlinBaseAcyivity implements KotlinContion.kotlincontionview {

    @Autowired
    String xibaipo;

    private RecyclerView kotlinview;

    @Override
    public int kaotlinLayout() {
        return R.layout.activity_main_dong_fang_hong8;
    }

    @Override
    public void kaotinitView() {
        ARouter.getInstance().inject(this);
        ToastUtils.showShort(xibaipo);
      kotlinview = findViewById(R.id.kotlinview);
      kotlinview.setLayoutManager(new StaggeredGridLayoutManager(1,StaggeredGridLayoutManager.VERTICAL));

      KotlindayPretenter pretenter = new KotlindayPretenter(new KotlindayModel(),this);
      pretenter.getkotlinper();

    }

    @Override
    public void kaotinitDate() {


    }


    @Override
    public void getkotlinvew(List<Javaday8.DataBean> dataBeans) {
        Basekotlinadpter basekotlinadpter = new Basekotlinadpter(dataBeans);
        kotlinview.setAdapter(basekotlinadpter);
    }
}
